/*
    io_gpio.h
	
	Author: Benedikt Niedermayr (2013)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

	This programm is also a result of my bachelor thesis.
*/
#ifndef _IO_GPIO_H
#define _IO_GPIO_H


//#include <linux/gpio.h>
#include "../io_communication_driver/io_com.h"


#define GPIO_BASE_NR	98
#define NUM_OF_GPIOS	19

char async_gpio_pin[3]="98";  //character of GPIO_BASE_NR
 
#define TR_MODE_SYNC	0	
#define TR_MODE_ASYNC	1

#define INPUT_FLOATING	'0'
#define INPUT_PULLUP	'1'
#define INPUT_PULLDOWN	'2'
#define OUTPUT_OPEN_DRAIN	'3'
#define OUTPUT_PUSH_PULL	'4'



struct io_gpio {
	
	unsigned	gpio_base;
	int 		num_gpios;
	struct gpio_chip io_gpio_chip;
	struct device *dev;
	struct device *class_dev;
};


#endif /* IO_GPIO_H */
